<template>
	<Modal class-name="install-modal" v-model="visible" :closable="false" :mask-closable="false" :footer-hide="true" :fullscreen="true">
		<div class="content">
			<Logo width="5.25rem" height="4.38rem"></Logo>
			<p class="title">鸡小蟹 V{{ version }}</p>
		</div>
		<div class="footer">
			<Button type="primary" @click="initHandle">开始使用</Button>
		</div>
	</Modal>
</template>
<script>
import Logo from '@/components/svg/logo.vue'
export default {
	components: {
		Logo
	},
	props: {
		value: {
			type: Boolean,
			default: false
		},
		version: {
			type: String,
			default: () => ''
		}
	},
	watch: {
		value(val) {
			this.visible = val
		}
	},
	computed: {
		visible: {
			get() {
				return this.value
			},
			set(val) {
				this.$emit('input', val)
			}
		}
	},
	data() {
		return {}
	},
	methods: {
		cancelHandle() {
			this.visible = false
		},
		initHandle() {
			chrome.webview.hostObjects.form.OnPageEvent('start')
		}
	},
	mounted() {}
}
</script>
<style lang="less" scoped>
// /deep/.ivu-modal {
// 	width: 31.88rem !important;
// }
/deep/.ivu-modal-header {
	border: 0 !important;
}
/deep/.ivu-modal-footer {
	border: 0;
}
/deep/.ivu-modal-body {
	padding: 10px;
}
/deep/.ivu-modal-content {
	// border-radius: 2rem;
	padding: 3.2rem 0 3rem 0;
}
.install-modal {
	// .modal-header {
	// 	height: 24px;
	// 	line-height: 24px;
	// }
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		/deep/.fill-color {
			fill: var(--bg-color);
		}
		/deep/.fill-color2 {
			fill: var(--svg-logo-color);
		}
		.title {
			text-align: center;
			font-family: PingFangSC-Semibold;
			font-size: 1.25rem;
			color: var(--setting-text-title-color);
			letter-spacing: 0;
			font-weight: 600;
			margin-top: 1rem;
			margin-bottom: 2.5rem;
		}
	}
	.footer {
		text-align: center !important;
	}
	.footer button {
		border-radius: 1.8rem;
		padding: 0.5rem 2.05rem 0.5rem 2.05rem;
		height: 3rem;
	}
	.footer /deep/.ivu-btn-default span {
		font-family: PingFangSC-Semibold;
		font-size: 1.13rem;
		color: #ffffff;
		letter-spacing: 0;
		// line-height: 32px;
		font-weight: 600;
	}
}
</style>
